From be0964d9e1d110ff647d3d6433835786b88f9435 Mon Sep 17 00:00:00 2001
From: Lauri Vuorela <lauri.vuorela@gmail.com>
Date: Mon, 5 Feb 2024 02:16:30 +0100
Subject: format currency with thousand separators (#81)

---
 src/app/groups/[groupId]/expenses/expense-list.tsx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'src/app/groups/[groupId]/expenses/expense-list.tsx')

diff --git a/src/app/groups/[groupId]/expenses/expense-list.tsx b/src/app/groups/[groupId]/expenses/expense-list.tsx
index a97c2bd..cc908af 100644
--- a/src/app/groups/[groupId]/expenses/expense-list.tsx
+++ b/src/app/groups/[groupId]/expenses/expense-list.tsx
@@ -3,7 +3,7 @@ import { CategoryIcon } from '@/app/groups/[groupId]/expenses/category-icon'
 import { Button } from '@/components/ui/button'
 import { SearchBar } from '@/components/ui/search-bar'
 import { getGroupExpenses } from '@/lib/api'
-import { cn, formatExpenseDate } from '@/lib/utils'
+import { cn, formatCurrency, formatExpenseDate } from '@/lib/utils'
 import { Expense, Participant } from '@prisma/client'
 import dayjs, { type Dayjs } from 'dayjs'
 import { ChevronRight } from 'lucide-react'
@@ -156,7 +156,7 @@ export function ExpenseList({
                       expense.isReimbursement ? 'italic' : 'font-bold',
                     )}
                   >
-                    {currency} {(expense.amount / 100).toFixed(2)}
+                    {formatCurrency(currency, expense.amount)}
                   </div>
                   <div className="text-xs text-muted-foreground">
                     {formatExpenseDate(expense.expenseDate)}
-- 
cgit v1.3

